<?php

echo "计算输入的两个整数加减乘除的结果\n";
echo "请输入两个整数，用英文逗号分隔：\n";
$count = fscanf(STDIN, "%d,%d", $a, $b, $other);
if ($count == 2) {
    $ji = $a * $b;
    $he = $a + $b;
    $cha = $a - $b;
    echo "$a + $b = $he\n";
    echo "$a - $b = $cha\n";
    echo "$a * $b = $ji\n ";
    if ($b != 0) {
        $shang = $a / $b;
        echo "$a / $b=$shang\n";
    } else {
        echo "$a / $b=错误 \n";
    }
} else {
    echo "请按要求来输入数据\n";

}